<?php
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<!-- <?php if ($block->getTitle()): ?>
    <h3><?php /* @escapeNotVerified */ echo $block->getTitle() ?></h3>
<?php endif ?> -->
<?php if (!empty($tabs)): ?>
<div id="<?php /* @escapeNotVerified */ echo $block->getId() ?>">
<ul  class="tabs-horiz">
<?php foreach ($tabs as $_tab): ?>
    <?php $_tabClass = 'tab-item-link ' . $block->getTabClass($_tab) . ' ' . (preg_match('/\s?ajax\s?/', $_tab->getClass()) ? 'notloaded' : '') ?>
    <?php $_tabType = (!preg_match('/\s?ajax\s?/', $_tabClass) && $block->getTabUrl($_tab) != '#') ? 'link' : '' ?>
    <?php $_tabHref = $block->getTabUrl($_tab) == '#' ? '#' . $block->getTabId($_tab) . '_content' : $block->getTabUrl($_tab) ?>
    <li>
        <a href="<?php /* @escapeNotVerified */ echo $_tabHref?>" id="<?php /* @escapeNotVerified */ echo $block->getTabId($_tab) ?>" title="<?php /* @escapeNotVerified */ echo $block->getTabTitle($_tab) ?>" class="<?php $_tabClass ?>" data-tab-type="<?php $_tabType ?>">
            <span>
                <span class="changed" title="<?php /* @escapeNotVerified */ echo __('The information in this tab has been changed.') ?>"></span>
                <span class="error" title="<?php /* @escapeNotVerified */ echo __('This tab contains invalid data. Please resolve this before saving.') ?>"></span>
                <span class="loader" title="<?php /* @escapeNotVerified */ echo __('Loading...') ?>"></span>
                <?php /* @escapeNotVerified */ echo $block->getTabLabel($_tab) ?>
            </span>
        </a>
        <div id="<?php /* @escapeNotVerified */ echo $block->getTabId($_tab) ?>_content" style="display:none"><?php /* @escapeNotVerified */ echo $block->getTabContent($_tab) ?></div>
    </li>
<?php endforeach; ?>
</ul>
</div>
<script>
require(["jquery","mage/backend/tabs"], function($){
    $(function() {
        $('#<?php /* @escapeNotVerified */ echo $block->getId() ?>').tabs({
            active: '<?php /* @escapeNotVerified */ echo $block->getActiveTabId() ?>',
            destination: '#<?php /* @escapeNotVerified */ echo $block->getDestElementId() ?>',
            shadowTabs: <?php /* @escapeNotVerified */ echo $block->getAllShadowTabs()?>
        });
    });
});
</script>
<?php endif; ?>
